import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';

class App extends Component {

    constructor(props){
        super(props);
        this.onClickButton = this.onClickButton.bind(this);
        this.state = {count:0};
    }

    onClickButton(){
        this.setState({count:this.state.count + 1});
    }

  render() {
    return (
      <div>
          <button onClick={this.onClickButton}>click me</button>
        <p>
          Click count:{this.state.count}
        </p>
      </div>
    );
  }
}

export default App;
